//
//  ViewController.m
//  迭代器模式
//
//  Created by flannery on 2018/12/17.
//  Copyright © 2018年 flannery. All rights reserved.
//

#import "ViewController.h"
#import "NameRepository.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

    
    NameRepository *namesRepository = NameRepository.new;
    
    for (id<Iterator> iter = [namesRepository getIterator]; [iter hasNext]; ) {
        NSString *name = [iter next];
        NSLog(@"%@", name);
    }
}


@end
